package com.taoz.rpc.core.proxy;

import java.lang.reflect.Proxy;

public class ServiceProxyFactory {

    // 获取该类的代理对象
    public static <T> T getServiceProxy(Class<T> clazz) {
        return (T) Proxy.newProxyInstance(
                clazz.getClassLoader(),
                new Class<?>[]{clazz},
                new ServiceProxyHandler()
        );
    }
}
